/**
 * 
 */
package es.uned.eped.parking;

/**
 * @author Paloma
 * Plazas del parking
 */
public class ParkingSpace {

private Integer space;
private Vehicle vehicle;

public ParkingSpace(Integer plaza){
	this.space=space;
    this.vehicle = null;
}

public ParkingSpace(Integer plaza, Vehicle vehiculo){
	this.space=plaza;
    this.vehicle = vehiculo;
}

public Integer getSpace() {
	return space;
}

public void setSpace(Integer space) {
	this.space = space;
}

public Vehicle getVehicle() {
	return vehicle;
}

public void setVehicle(Vehicle vehicle) {
	this.vehicle = vehicle;
}

public void removeVehicle(){
	
}

@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((space == null) ? 0 : space.hashCode());
	result = prime * result + ((vehicle == null) ? 0 : vehicle.hashCode());
	return result;
}

@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	ParkingSpace other = (ParkingSpace) obj;
	if (space == null) {
		if (other.space != null)
			return false;
	} else if (!space.equals(other.space))
		return false;
	if (vehicle == null) {
		if (other.vehicle != null)
			return false;
	} else if (!vehicle.equals(other.vehicle))
		return false;
	return true;
}

}
